//
//  BattleMainLayer.h
//  SpaceStorm
//
//  Created by 祥 雍 on 13-4-10.
//  Copyright (c) 2013年 __MyCompanyName__. All rights reserved.
//
//  [主战斗层]玩家看到的核心层面，主要的火力交叉都在这个层面
//

#import "cocos2d.h"
#import "Constants.h"
#import "BattleLayerBase.h"
#import "Ship.h"
#import "BulletCache.h"

@interface BattleMainLayer : BattleLayerBase
{
    CGSize size;
    BulletCache* _bulletCache;
    int nextInactiveBullet;
    NSMutableDictionary* _myTeam;       //自己战舰的字典
    NSMutableDictionary* _enemiesTeam;  //敌方战舰的字典
    float _gap;            //初始位置船之间的间隔
    float _leftTopGap;     //上方左边的边距，用来排初始位置的
    float _rightTopGap;    //上方右边得边距
    float _leftBottomGap;  //下方左边得边距
    float _rightBottomGap; //下方右边得边距
    
    
    
}

-(void) initBulletCache;
-(void) beginFight:(CCArray*)myTeam enemiesTeam:(CCArray*)enemiesTeam;

-(void) selectShip:(Ship*)ship;
-(void) selectShipWithIndex:(int)shipIndex;
-(void) unselectShip;

-(CGPoint) getDefaultPoint:(BOOL)isTeam index:(int)index; 

@property (readwrite, assign) BulletCache* bulletCache;
@property (readwrite, retain) NSMutableDictionary* myTeam;     //攻击武器组  
@property (readwrite, retain) NSMutableDictionary* enemiesTeam;    //防御武器组
@end
